<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
    <script>
        function sendGet() {
            $.ajax({
                type:'get',
                url:'servlet_homework',
                success:function(body) {
                    console.log(body);
                }
            });
        }

        function sendPost() {
            $.ajax({
                type:'post',
                url:'servlet_homework',
                success:function(body) {
                    console.log(body);
                }
            });
        }

        function sendDelete() {
            $.ajax({
                type:'delete',
                url:'servlet_homework',
                success:function(body) {
                    console.log(body);
                }
            });
        }
    </script>
</head>
<body>
    <input type="button" onclick="sendGet()" value="发送 get 请求">
    <input type="button" onclick="sendPost()" value="发送 send 请求">
    <input type="button" onclick="sendDelete()" value="发送 delete 请求">
</body>
</html>